package xkp.lesson1;

import javax.swing.*;
import java.awt.*;

public class TestJLable extends JFrame {
    public TestJLable() throws HeadlessException {
        this.setTitle("MyFrame");
        //this.setSize(400,300);
        this.setBounds(400,300,600,600);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel jPanel = new JPanel();
        ImageIcon imageIcon = new ImageIcon("D:\\money.png");
        JLabel jLabel = new JLabel("money",imageIcon,JLabel.CENTER);
        jPanel.add(jLabel);
        this.add(jPanel);
    }

    @Override
    public void setVisible(boolean b) {
        super.setVisible(b);
    }

    public static void main(String[] args) {
        new TestJLable().setVisible(true);
    }
}
